<?php

namespace apiend\modules\user\controllers;

use Yii;
use apiend\components\Controller;

/**
 * 动态展示列表相关功能
 * Default controller for the `user` module
 */
class DefaultController extends Controller {

    public $modelClass = 'apiend\modules\user\models\UserSearch';

    /**
     * {@inheritdoc}
     */
    public function actions() {
        return [
            'view' => [
                'class' => 'yii\rest\ViewAction',
                'modelClass' => $this->modelClass,
            ],
        ];
    }

    /**
     * @inheritdoc
     */
    protected function rules() {
        return [
            [
                'allow' => true,
                'roles' => ['@'],
            ],
        ];
    }

}
